package com.seata.demo.seatarole.controller;

import com.seata.demo.seatarole.entity.Role;
import com.seata.demo.seatarole.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RoleController {

    @Autowired
    RoleService roleService;

    @PostMapping("/role/add")
    public void add(@RequestBody Role role){
        roleService.insert(role);
    }

}

